<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/Money/searchfirst.css">
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header layui-bg-cyan">
            <span>收款</span>
            <div class="titleright">
                <button id="collectionBtn" class="layui-btn layui-btn-sm" style="margin-right:1em;" lay-filter="collectionStatistics">
                    <span>统计</span>
                    <i class="layui-icon layui-icon-triangle-d"></i>
                </button>
            </div>
        </div>
        <div class="layui-card-body">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-tab layui-tab-card">
                        <form class="layui-form layui-from-pane" action="" id="editor-form" lay-filter="editor-form">
                            <div class="layui-inline">
                                <label class="layui-form-label">单据类型</label>
                                <div class="layui-input-inline">
                                    <select name="status">
                                        <option value=""></option>
                                        <option value="1">登记箱</option>
                                        <option value="2">招领箱</option>
                                        <option value="3">待确认箱</option>
                                        <option value="4">确认箱</option>
                                        <option value="5">完成箱</option>
                                        <option value="6">垃圾箱</option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">单据信息</label>
                                <div class="layui-input-inline">
                                    <input class="text layui-input" type="text"  name="info" autocomplete="off" placeholder="">
                                </div>
                            </div>
                            <div class="layui-inline daterange">
                                <label class="layui-form-label">收款日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input starttime" id="startTime" name="startTime" placeholder="年 - 月 - 日">&nbsp;至&nbsp;<input type="text" class="layui-input starttime" id="endTime" name="endTime" placeholder="年 - 月 - 日">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">制单公司</label>
                                <div class="layui-input-inline">
                                    <select name="voucherCompanyCode" id="voucherCompanyCode" lay-search>
                                        <option value=""></option>
                                    </select>
                                </div>
                            </div>
                            <div class="layui-inline daterange">
                                <label class="layui-form-label">认领日期</label>
                                <div class="layui-input-inline">
                                    <input type="text" class="layui-input starttime" name="startClaimDate" placeholder="年 - 月 - 日">&nbsp;至&nbsp;<input type="text" class="layui-input starttime" name="endClaimDate" placeholder="年 - 月 - 日">
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">所属操作员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="operationNo" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">所属业务员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="salesmanCode" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">部门操作员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="deptOperationCode" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">部门业务员</label>
                                <div class="layui-input-inline" style="width: 200px">
                                    <div id="deptSalesmanCode" class="xm-select-demo"></div>
                                </div>
                            </div>
                            <div class="layui-inline">
                                <label class="layui-form-label">币种</label>
                                <div class="layui-input-inline">
                                    <select lay-search name="currencyCode" id="currencyCode">
                                        <option value=""></option>
                                    </select>
                                </div>
                            </div>
                            <button class="layui-btn layui-btn-sm layui-btn-submit" lay-submit="" lay-filter="submitform" style="margin-left: 10px">搜索</button>
                            <button type="reset" class="layui-btn layui-btn-sm layui-btn-submit" id="clear">重置</button>
                        </form>
                        <div id="tablediv">
                            <table class="layui-table" id="maininformation" lay-filter="maininformationtable"></table>
                        </div>
                        <div class="padding text-right">
                            <button type="button" class="layui-btn" id="refundregistration">退款登记</button>
                            <%--<button type="button" class="layui-btn" id="akeybreakup">一键拆分</button>--%>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/html" id="maininformationtoolbar">
    {{# if(isFinance === "是" || isAdmin || !isFactoryFinance){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" id="new" style="margin-left: 10px" lay-event="news">登记</a>
    <a class="layui-btn layui-btn-sm layui-btn-danger" id="del" style="margin-left: 10px" lay-event="dels">删除</a>
    {{# } }}
</script>

<script type="text/html" id="maininformationeditor">
    {{# if(d.statusStr=='登记箱' && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="collectioncase">收款招领</a>
    {{# } }}
    {{# if(d.statusStr=='登记箱' && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="update">修改</a>
    {{# } }}
    {{# if(d.statusStr=='招领箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="paymentclaim">收款认领</a>
    {{# } }}
    {{# if(d.statusStr=='招领箱' && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="andreturn">招领退回</a>
    {{# } }}
    {{# if(d.statusStr=='待确认箱' && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="claimtoconfirm">认领确认</a>
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="backFind">退回招领</a>
    {{# } }}
    {{# if(d.statusStr=='确认箱' && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="confirmback">确认退回</a>
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="gatheringsplit">收款拆分</a>
    {{# } }}
    {{# if(d.statusStr=='确认箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="split">拆分完成</a>
    {{# } }}
    {{# if(d.statusStr=='完成箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="completethereturn">完成退回</a>
    {{# } }}
    {{# if((d.statusStr=='登记箱' ||d.statusStr=='垃圾箱') && isFinance=='是'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="delect">删除</a>
    {{# } }}
    {{# if(d.statusStr=='垃圾箱'){ }}
    <a class="layui-btn layui-btn-sm layui-btn-normal" lay-event="reduction">还原</a>
    {{# } }}
    {{# if(d.statusStr=='登记箱' || d.statusStr=='招领箱' || d.statusStr=='待确认箱' || d.statusStr=='确认箱' || d.statusStr=='完成箱'){ }}
    <small>标记：</small> <div class="colorvalue" data-id = "{{d.id}}" data-index="{{d.LAY_TABLE_INDEX}}"></div>
    {{# } }}
</script>
<%@ include file="../tpl/foot.jsp"%>
<script src="statics/modules/xm-select.js"></script>
<script src="statics/js/Money/collection.js"></script>